<?php

//基础权限
$base = array(
    "index_welcome" => 1,
);

//管理员权限
$manage = array_merge($base, array(
    "mytask_tasklist" => 1,
    "mytask_addtask" => 1,
    "mytask_edittask" => 1,
    "myjoin_joinlist" => 1,
));

//系统管理员权限
$admin = array_merge($base, $manage, array(
    "ad_adlist" => 1,
    "ad_edit" => 1,
    "ad_add" => 1,
    "task_tasklist" => 1,
    "task_edittask" => 1,
    "withdrawal_withdrawallist" => 1,
    "que_lists" => 1,
    "que_add" => 1,
    "que_edit" => 1,
    "user_lists" => 1,
    "online_edit" => 1
));

//超管理权限
$superAdmin = array_merge($base, $manage, $admin, array(
    "admin_lists" => 1,
    "admin_add" => 1,
    'admin_edit' => 1,
    "recomm_editconf" => 1,
    "recomm_tasklist" => 1
));

//导航列表
$menuList = array(
    "index_welcome" => array(
        "name" => "欢迎页",
        "url" => C('WEB_DOMAIN') . "/Console/Index/welcome",
    ),
    "myTask" => array(
        "name" => "我的任务",
        "sub" => array(
            "mytask_tasklist" => array(
                "name" => "任务列表",
                "url" => C('WEB_DOMAIN') . "/Console/MyTask/taskList"
            ),
            "myjoin_joinlist" => array(
                "name" => "审核任务",
                "url" => C('WEB_DOMAIN') . "/Console/MyJoin/joinList"
            ),
            "mytask_addtask" => array(
                "name" => "添加任务",
                "hide" => true//不在导航显示
            ),
            "mytask_edittask" => array(
                "name" => "编辑任务",
                "hide" => true//不在导航显示
            ),
        )
    ),
    "task" => array(
        "name" => "任务管理",
        "sub" => array(
            "task_tasklist" => array(
                "name" => "任务列表",
                "url" => C('WEB_DOMAIN') . "/Console/Task/taskList"
            ),
            "task_edittask" => array(
                "name" => "编辑任务",
                "hide" => true//不在导航显示
            ),
        )
    ),
    "withdrawal" => array(
        "name" => "提现管理",
        "sub" => array(
            "withdrawal_withdrawallist" => array(
                "name" => "提现列表",
                "url" => C('WEB_DOMAIN') . "/Console/Withdrawal/withdrawalList"
            )
        )
    ),
    "ad" => array(
        "name" => "广告管理",
        "sub" => array(
            "ad_adlist" => array(
                "name" => "广告列表",
                "url" => C('WEB_DOMAIN') . "/Console/Ad/adList"
            ),
            "ad_edit" => array(
                "name" => "添加广告",
                "url" => C('WEB_DOMAIN') . "/Console/Ad/edit",
                "hide" => true//不在导航显示
            )
        )
    ),
    "que" => array(
        "name" => "问题管理",
        "sub" => array(
            "que_lists" => array(
                "name" => "问题列表",
                "url" => C('WEB_DOMAIN') . "/Console/Que/lists"
            ),
            "que_add" => array(
                "name" => "添加问题",
                "url" => C('WEB_DOMAIN') . "/Console/Que/add",
                "hide" => true//不在导航显示
            ),
            "que_edit" => array(
                "name" => "编辑问题",
                "url" => C('WEB_DOMAIN') . "/Console/Que/edit",
                "hide" => true//不在导航显示
            )
        )
    ),
    "recomm" => array(
        "name" => "收徒管理",
        "sub" => array(
            "recomm_editconf" => array(
                "name" => "收徒分成配置",
                "url" => C('WEB_DOMAIN') . "/Console/Recomm/editConf"
            ),
            "recomm_tasklist"=>array(
                "name" => "徒弟任务查询",
                "url" => C('WEB_DOMAIN') . "/Console/Recomm/taskList"
            )
        )
    ),
    "online" => array(
        "name" => "客服管理",
        "sub" => array(
            "online_edit" => array(
                "name" => "编辑客服",
                "url" => C('WEB_DOMAIN') . "/Console/Online/edit"
            )
        )
    ),
    "user" => array(
        "name" => "用户管理",
        "sub" => array(
            "user_lists" => array(
                "name" => "用户列表",
                "url" => C('WEB_DOMAIN') . "/Console/User/lists"
            ),
        )
    ),
    "admin" => array(
        "name" => "管理员管理",
        "sub" => array(
            "admin_lists" => array(
                "name" => "管理员列表",
                "url" => C('WEB_DOMAIN') . "/Console/Admin/lists"
            ),
            "admin_add" => array(
                "name" => "添加管理员",
                "url" => C('WEB_DOMAIN') . "/Console/Admin/add",
                "hide" => true//不在导航显示
            ),
            "admin_edit" => array(
                "name" => "编辑管理员",
                "url" => C('WEB_DOMAIN') . "/Console/Admin/edit",
                "hide" => true//不在导航显示
            )
        )
    )
);

return array(
    "roleAuth" => array(
        "manage" => $manage,
        "admin" => $admin,
        "superAdmin" => $superAdmin
    ),
    "menuList" => $menuList
);
